package hr.dario.fragments;

import android.support.v4.app.FragmentActivity;
import android.content.res.Configuration;
import android.os.Bundle;

public class LocationsActivity extends FragmentActivity{
	
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);       
    }
    
    public static class LocDescActivity extends FragmentActivity{
    	
    	@Override
		public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        
	        if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
	            finish();
	            return;
	        }

	        
	        if (savedInstanceState == null) {
                // During initial setup, plug in the details fragment.
                LocDescFragment details = new LocDescFragment();
                details.setArguments(getIntent().getExtras());
                getSupportFragmentManager().beginTransaction().add(
                        android.R.id.content, details).commit();
            }
			
	    }
    	
    }
    
}